package com.hxzy.service.impl;

import com.hxzy.dao.BookTypeDao;
import com.hxzy.dao.impl.BookTypeDaoImpl;
import com.hxzy.service.BookTypeService;
import entity.BookType;

import java.util.List;
import java.util.Optional;

public class BookTypeServiceImpl implements BookTypeService {
    private  BookTypeDao bookTypeDao=new BookTypeDaoImpl();
    @Override
    public int insert(BookType bookType) {
        return bookTypeDao.insert(bookType);
    }

    @Override
    public int updateByPrimaryKey(BookType bookType) {
        return bookTypeDao.updateByPrimaryKey(bookType);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return bookTypeDao.deleteByPrimaryKey(id);
    }

    @Override
    public Optional<BookType> selectByPrimaryKey(Integer id) {
        return bookTypeDao.selectByPrimaryKey(id);
    }
}
